Jump to content

Building a Yocto Image

From RidgeRun Developer Wiki


Follow us on: YouTube Twitter LinkedIn Email Share this page

Share This Page




Build BSP Image

This section describes how to create and build a Yocto BSP image using Qualcomm Linux and kas.

Clone Qualcomm Yocto Meta Layers

Get into the workspace directory:

WORKSPACE_DIR=${HOME}
cd $WORKSPACE_DIR

Download the Qualcomm Yocto meta layers. Replace META_QCOM_RELEASE with the appropriate release tag. Set the release in the environment variable:

META_QCOM_RELEASE=qli-2.0-rc2

You can find the meta-layer repository information in meta-qcom-releases

git clone https://github.com/qualcomm-linux/meta-qcom-releases -b $META_QCOM_RELEASE

Checkout kas Lock File

kas checkout $WORKSPACE_DIR/meta-qcom-releases/lock.yml

This command utilizes the kas tool for syncing meta layers, configuring the environment, and executing BitBake commands in the WORKSPACE_DIR. It creates the following folders and meta-layers:

bitbake 
build
meta-audioreach  
meta-openembedded  
meta-qcom  
meta-qcom-distro  
meta-qcom-releases  
meta-security  
meta-selinux  
meta-updater  
meta-virtualization  
oe-core

Copy Lock File

Copy the kas lock file to ensure consistent layer versions.

cp $WORKSPACE_DIR/meta-qcom-releases/lock.yml $WORKSPACE_DIR/meta-qcom/ci/lock.yml

Build the Image

Define your build using machine and distribution configuration files.

To find the available machines, run:

ls $WORKSPACE_DIR/meta-qcom/conf/machine/

Example of machines in output:

iq-615-evk
iq-8275-evk
iq-9075-evk
iq-x7181-evk

Define your machine:

MACHINE=iq-9075-evk

To find the .yml configuration files for distros run:

ls $WORKSPACE_DIR/meta-qcom/ci/

Examples of distros in output:

qcom-distro-selinux.yml
qcom-distro-prop-image.yml
qcom-distro.yml
qcom-distro-sota.yml
qcom-distro-catchall.yml

Define your distro:

DISTRO=qcom-distro-prop-image

The linux-qcom-6.18.yml configuration is a standard component in Qualcomm Linux builds. To find kernel version run:

ls meta-qcom/ci/linux-qcom*.yml

Get this result with available kernel versions:

meta-qcom/ci/linux-qcom-6.18.yml  
meta-qcom/ci/linux-qcom-next-rt.yml  
meta-qcom/ci/linux-qcom-next.yml  
meta-qcom/ci/linux-qcom-rt-6.18.yml

Set it to environment variable:

KERNEL_VERSION=6.18

To find the available images, get into the kas shell workspace by using:

cd $WORKSPACE_DIR
kas shell meta-qcom/ci/$MACHINE.yml:meta-qcom/ci/$DISTRO.yml:meta-qcom/ci/linux-qcom-$KERNEL_VERSION.yml:meta-qcom/ci/lock.yml

And then run:

bitbake-layers show-recipes "*image*"

Example qcom images in output:

qcom-console-image
qcom-minimal-image
qcom-multimedia-image
qcom-multimedia-proprietary-image
qcom-container-orchestration-image

Define the image you want to compile:

IMAGE=qcom-minimal-image

And then to compile a single image run:

bitbake $IMAGE

Get out of the kas shell with Ctrl+D or run:

exit

Remember to set up locales (specified on previous section), otherwise, might throw error:

Please make sure locale 'en_US.UTF-8' is available on your system
2026-04-07 13:32:53 - ERROR    - Command "/home/ridgerun/bitbake/bin/bitbake -c build qcom-multimedia-image qcom-multimedia-proprietary-image qcom-container-orchestration-image" failed with error 1

Verify Build Artifacts

After a successful build, verify that the root filesystem image exists.

cd $WORKSPACE_DIR/build/tmp/deploy/images/$MACHINE/$IMAGE-$MACHINE.rootfs.qcomflash/

And list the rootfs.img information with:

ls -al rootfs.img

You can list all the compiled images available with:

ls $WORKSPACE_DIR/build/tmp/deploy/images/$MACHINE/

Compile multimedia full images

To compile qcom-multimedia-image, qcom-multimedia-proprietary-image and qcom-container-orchestration-image, run this command outside the kas shell:

cd $WORKSPACE_DIR
kas build meta-qcom/ci/$MACHINE.yml:meta-qcom/ci/$DISTRO.yml:meta-qcom/ci/linux-qcom-$KERNEL_VERSION.yml:meta-qcom/ci/lock.yml

Notes


Cookies help us deliver our services. By using our services, you agree to our use of cookies.